Yields time back to REALbasic so that it can handle other events. The optional parameter specifies the amount of time you want the currently executing thread to sleep.
Syntax |
|---|
|
ConsoleApplication.DoEvents [milliseconds] |
Parameters |
|
|---|---|
|
milliseconds |
Integer (Optional) |
Notes
If all threads are sleeping, then REALbasic yields back time to the system. This allows you to write applications that don't use up to 100% of the CPU during tight loops.
Specifying zero milliseconds causes the next waiting thread to execute. A negative value specifies no sleep. The default is 10 milliseconds.